package com.cm.caseManagement.pojo.entity;
import com.cm.caseManagement.annotation.Excel;
import com.cm.caseManagement.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 菜单权限对象 cm_sys_menu
 *
 * @author ruoyi
 * @date 2025-10-05
 */
public class CmSysMenu extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部唯一id */
    @Excel(name = "外部唯一id")
    private String publicId;

    /** 菜单/按钮名称 */
    @Excel(name = "菜单/按钮名称")
    private String name;

    /** 权限标识（如 sys:user:add） */
    @Excel(name = "权限标识", readConverterExp = "如=,s=ys:user:add")
    private String permission;

    /** 路由路径 */
    @Excel(name = "路由路径")
    private String path;

    /** 父菜单ID，0表示根目录 */
    @Excel(name = "父菜单ID，0表示根目录")
    private Long parentId;

    /** 菜单图标 */
    @Excel(name = "菜单图标")
    private String icon;

    /** 是否可见：0-隐藏，1-显示 */
    @Excel(name = "是否可见：0-隐藏，1-显示")
    private String visible;

    /** 排序值，越小越靠前 */
    @Excel(name = "排序值，越小越靠前")
    private Long sortOrder;

    /** 菜单类型：0-目录，1-菜单，2-按钮 */
    @Excel(name = "菜单类型：0-目录，1-菜单，2-按钮")
    private String menuType;

    /** 删除时间（逻辑删除） */
    @Excel(name = "删除时间", readConverterExp = "逻=辑删除")
    private Date deleteTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPublicId(String publicId)
    {
        this.publicId = publicId;
    }

    public String getPublicId()
    {
        return publicId;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }

    public void setPermission(String permission)
    {
        this.permission = permission;
    }

    public String getPermission()
    {
        return permission;
    }

    public void setPath(String path)
    {
        this.path = path;
    }

    public String getPath()
    {
        return path;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setIcon(String icon)
    {
        this.icon = icon;
    }

    public String getIcon()
    {
        return icon;
    }

    public void setVisible(String visible)
    {
        this.visible = visible;
    }

    public String getVisible()
    {
        return visible;
    }

    public void setSortOrder(Long sortOrder)
    {
        this.sortOrder = sortOrder;
    }

    public Long getSortOrder()
    {
        return sortOrder;
    }

    public void setMenuType(String menuType)
    {
        this.menuType = menuType;
    }

    public String getMenuType()
    {
        return menuType;
    }

    public void setDeleteTime(Date deleteTime)
    {
        this.deleteTime = deleteTime;
    }

    public Date getDeleteTime()
    {
        return deleteTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("publicId", getPublicId())
            .append("name", getName())
            .append("permission", getPermission())
            .append("path", getPath())
            .append("parentId", getParentId())
            .append("icon", getIcon())
            .append("visible", getVisible())
            .append("sortOrder", getSortOrder())
            .append("menuType", getMenuType())
            .append("deleteTime", getDeleteTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
